Don't encode precise in lockfile dep pointers
authorAlex Crichton <alex@alexcrichton.com>
Mon, 27 Oct 2014 18:54:48 +0000 (11:54 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 27 Oct 2014 23:42:06 +0000 (16:42 -0700)
commitef8855fdc3615296db3d98c1a589fafc29aac2e4
treed59bbca8b8fc93c19576aa6b930e10047e9df029
parent9f081ef77eb5effab397e7218e16dcd8ee246aed
Don't encode precise in lockfile dep pointers

Each dependency itself already has the precise source listed, and we're
guaranteed that for each (source, name) pair that there is exactly one
dependency, so there is always a way to rebuild the precise dependency graph
after the fact by looking up the (source, name) pair in the hash map.

This should help with some of the readability concerns in #637 because the git
SHA that a source is locked to is now only mentioned once in a lockfile.

This commit does preserve, however, the mention of the version in each
dependency line which will likely never go away. This means that for
registry-based packages will still run into the same lockfile merge conflict
troubles, there will just be more readable versions than git hashes.

It should also be noted that this will alter all currently generated lockfiles
as any dependencies mentioned will lose the hashes mentioned afterwards. This
will likely cause somewhat of a transitionary pain as this version of cargo
propagates throughout.
src/cargo/core/package_id.rs
src/cargo/core/resolver/encode.rs